{% extends "base_site.html" %}
{% load static tz %}

{% block title %}Meetings{% endblock %}

{% block extrahead %}{{ block.super }}
{% endblock %}

{% block breadcrumbs %}{{ block.super }}
    &raquo; <a href="{% url "ietf.secr.meetings.views.main" %}">Meetings</a>
    &raquo; <a href="{% url "ietf.secr.meetings.views.view" meeting_id=meeting.number %}">{{ meeting.number }}</a>
    &raquo; {{ session.group.acronym }}
{% endblock %}

{% block content %}

    <div class="module">
        <h2>Edit Session</h2>

        <form id="meetings-schedule-form" method="post">{% csrf_token %}
            <div class="inline-related{% if forloop.last %} last-related{% endif %}">
                <table class="full-width amstable">{% timezone meeting.time_zone %}
                    <tbody>
                    <tr>
                        <th scope="row">Day:</th>
                        <td>{% if timeslot %}{{ timeslot.time|date:"l" }}{% endif %}</td>
                    </tr>
                    <tr>
                        <th scope="row">Time:</th>
                        <td>{% if timeslot %}{{ timeslot.time|time:"H:i" }}{% endif %}</td>
                    </tr>
                    <tr>
                        <th scope="row">Room:</th>
                        <td>{% if timeslot %}{{ timeslot.location.name }}{% endif %}</td>
                    </tr>
                    <tr>
                        <th scope="row">Status:</th>
                        <td>{{ current_status_name }}</td>
                    </tr>
                     <!-- [html-validate-disable-block wcag/h63 -- FIXME: as_table renders without scope] -->
                    {{ form.as_table }}
                </tbody>
                {% endtimezone %}</table>
            </div> <!-- inline-related -->

        <div class="button-group">
            <ul>
                <li><button type="submit" name="submit" value="Save">Save</button></li>
                <li><button type="button" onclick="window.location='{% url "ietf.secr.meetings.views.regular_sessions" meeting_id=meeting.number schedule_name=schedule.name %}'">Back</button></li>
            </ul>
        </div> <!-- button-group -->

    </form>

    </div> <!-- module -->

{% endblock %}

{% block footer-extras %}
    {% include "includes/meetings_footer.html" %}
{% endblock %}